package com.ruoyi.leader.api;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.leader.api.domain.TGroupLeader;
import com.ruoyi.leader.api.factory.RemoteLeaderFallbackFactory;

/**
 * 团长服务
 * 
 * @author ruoyi
 */
@FeignClient(contextId = "remoteLeaderService", value = ServiceNameConstants.LEADER_SERVICE, fallbackFactory = RemoteLeaderFallbackFactory.class)
public interface RemoteLeaderService
{
    /**
     * 新增团长信息
     *
     * @param tGroupLeader 团长信息
     * @param source 请求来源
     * @return 结果
     */
    @PostMapping("/leader")
    public R<Boolean> addLeader(@RequestBody TGroupLeader tGroupLeader, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
